package com.yuerlive.rainbow.api;

import com.yuerlive.rainbow.API;
import com.yuerlive.rainbow.entity.BankerFlowData;
import com.yuerlive.rainbow.entity.Banner;
import com.yuerlive.rainbow.entity.BaseData;
import com.yuerlive.rainbow.entity.CloseData;
import com.yuerlive.rainbow.entity.ContributionData;
import com.yuerlive.rainbow.entity.DayTaskData;
import com.yuerlive.rainbow.entity.GameInfo;
import com.yuerlive.rainbow.entity.KaiboData;
import com.yuerlive.rainbow.entity.LiveData;
import com.yuerlive.rainbow.entity.LiveDetailData;
import com.yuerlive.rainbow.entity.MissionData;
import com.yuerlive.rainbow.entity.NiuniuHistory;
import com.yuerlive.rainbow.entity.RecommendLive;
import com.yuerlive.rainbow.entity.StreamData;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by xiaoyi on 2017/5/23.
 */

public interface LiveService {

    @FormUrlEncoded
    @POST(API.LIVEDETAIL)
    Observable<BaseData<LiveDetailData>> getLiveDetail(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST(API.START_LIVE)
    Observable<BaseData<KaiboData>> startLive(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST(API.LIVE_NOTIFY)
    Observable<BaseData> sendLiveNotify(@FieldMap Map<String, String> params);

    /*结束直播*/
    @FormUrlEncoded
    @POST(API.CLOSE_LIVE)
    Observable<BaseData<CloseData>> closeLive(@FieldMap Map<String, String> params);

    /*游戏列表*/
    @POST(API.GMAE_LIST)
    Observable<BaseData<List<GameInfo>>> getGameList();

    /*领取日常福利*/
    @FormUrlEncoded
    @POST(API.GET_SWEETS)
    Observable<BaseData> getDaily(@FieldMap Map<String, String> params);

    /*贡献榜*/
    @FormUrlEncoded
    @POST(API.CONTRIBUTION_RANK)
    Observable<BaseData<List<ContributionData>>> getContributionList(@FieldMap Map<String, String> params);

    /*游戏胜负历史*/
    @FormUrlEncoded
    @POST(API.GAME_HISTORY)
    Observable<BaseData<List<NiuniuHistory>>> getNiuniuHistory(@FieldMap Map<String, String> params);

    /*设置直播封面*/
    @FormUrlEncoded
    @POST(API.SET_LIVEICON)
    Observable<BaseData> setLiveIcon(@FieldMap Map<String, String> params);

    /*离开直播间*/
    @FormUrlEncoded
    @POST(API.LEAVE_LIVEROOM)
    Observable<BaseData> leaveLiveRoom(@FieldMap Map<String, String> params);

    /*游戏信息*/
    @FormUrlEncoded
    @POST(API.GAMEINFO)
    Observable<BaseData<GameInfo>> getGameInfo(@FieldMap Map<String, String> params);

    @POST(API.MISSION_LIST)
    Observable<BaseData<List<DayTaskData>>> getMissionList();

    @FormUrlEncoded
    @POST(API.GET_MISSION_REWARD)
    Observable<BaseData<MissionData>> getMissionReward(@FieldMap Map<String,String> params);

    @FormUrlEncoded
    @POST(API.SHARE_LIVING)
    Observable<BaseData> shareLivingRequet(@FieldMap Map<String,String> params);

    @FormUrlEncoded
    @POST(API.SANGUO_BANKERFLOW)
    Observable<BaseData<BankerFlowData>> getSanguoBankerFlow(@FieldMap Map<String,String> params);

}
